<?php /* Smarty version 2.6.26, created on 2010-11-27 19:35:15
         compiled from practices.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'practices.tpl', 22, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<?php echo $this->_tpl_vars['info_action']; ?>


<h3>Oferty praktyk</h3>
<div class="table_div">
	<table class="practices_tab">
		<thead>
			<tr style="color:#789;font-weight: bold">
				<th>Lp.</th>
				<th>Data dodania</th>
				<th>Nazwa firmy</th>
				<th>Data rozpoczęcia</th>
				<th>Data zakończenia</th>
				<th>Liczba miejsc</th>
				<th>Akcje</th>
			</tr>
		</thead>
		<tbody>
		<?php if (! empty ( $this->_tpl_vars['practices'] )): ?>
			<?php $_from = $this->_tpl_vars['practices']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['practice'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['practice']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['practice']):
        $this->_foreach['practice']['iteration']++;
?>
			<tr style="background-color:<?php echo smarty_function_cycle(array('values' => "#F6F6F6,white"), $this);?>
">
				<td><?php echo $this->_foreach['practice']['iteration']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['add_date']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['company_name']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['date_start']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['date_end']; ?>
</td>
				<?php if ($this->_tpl_vars['practice']['amount'] > 0): ?>
					<td><?php echo $this->_tpl_vars['practice']['amount']; ?>
</td>
				<?php else: ?>
					<td><a href="#" class="tip_trigger"><span class="tip">Brak wolnych miejsc</span><img src="../images/user--minus.png"/></a></td>
				<?php endif; ?>
				<td>
					<a href ="edit_practice.php?edit_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" class="tip_trigger extLink" >
						<span class="tip">Zobacz/edytuj szczegóły praktyki.</span>
						<img src="../images/magnifier-left.png"/>
					</a>
					&nbsp
					<a href ="practices.php?delete_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" class="tip_trigger" ><span class="tip">Usuń praktykę.</span><img src="../images/cross.png"/></a>
				</td>
			</tr>
			<?php endforeach; endif; unset($_from); ?>
		<?php else: ?>
			<tr>
				<td colspan="7">Brak ofert praktyk</td>
			</tr>
		<?php endif; ?>
		</tbody>
	<table>
</div>
<br/>
<br/>
<h3>Oferty praktyk do zaakceptowania</h3>
<div class="table_div">
	<table class="practices_tab">
		<thead>
			<tr style="color:#789;font-weight: bold">
				<th>Lp.</th>
				<th>Data dodania</th>
				<th>Nazwa firmy</th>
				<th>Data rozpoczęcia</th>
				<th>Data zakończenia</th>
				<th>Liczba miejsc</th>
				<th>Akcje</th>
			</tr>
		</thead>
		<tbody>
		<?php if (! empty ( $this->_tpl_vars['practicesToAccept'] )): ?>
			<?php $_from = $this->_tpl_vars['practicesToAccept']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['practice'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['practice']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['practice']):
        $this->_foreach['practice']['iteration']++;
?>
			<tr style="background-color:<?php echo smarty_function_cycle(array('values' => "#F6F6F6,white"), $this);?>
">
				<td><?php echo $this->_foreach['practice']['iteration']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['add_date']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['company_name']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['date_start']; ?>
</td>
				<td><?php echo $this->_tpl_vars['practice']['date_end']; ?>
</td>
				<?php if ($this->_tpl_vars['practice']['amount'] > 0): ?>
					<td><?php echo $this->_tpl_vars['practice']['amount']; ?>
</td>
				<?php else: ?>
					<td><a href="#" class="tip_trigger"><span class="tip">Brak wolnych miejsc</span><img src="../images/user--minus.png"/></a></td>
				<?php endif; ?>
				<td>
					<a href ="edit_practice.php?edit_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" class="tip_trigger extLink" >
						<span class="tip">Zobacz/edytuj szczegóły praktyki.</span>
						<img src="../images/magnifier-left.png"/>
					</a>
					&nbsp
					<a href ="practices.php?accept_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" class="tip_trigger" ><span class="tip">Akceptuj praktykę.</span><img src="../images/tick.png"/></a>
					&nbsp
					<a href ="practices.php?delete_id=<?php echo $this->_tpl_vars['practice']['id']; ?>
" class="tip_trigger" ><span class="tip">Usuń praktykę.</span><img src="../images/cross.png"/></a>
				</td>
			</tr>
			<?php endforeach; endif; unset($_from); ?>
		<?php else: ?>
			<tr>
				<td colspan="7">Brak ofert praktyk do zaakceptowania</td>
			</tr>
		<?php endif; ?>
		</tbody>
	<table>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>